package days45.title70;

class Solution {
    public int climbStairs(int n) {
        int[] ans = new int[n + 1];
        ans[0] = 1;
        for (int i = 1; i <= n; i++) {
            if (i == 1) {
                ans[i] = 1;
            } else {
                ans[i] = ans[i - 1] + ans[i - 2];
            }
        }
        return ans[n];
    }
}